home *** CD-ROM | disk | FTP | other *** search
/ Personal Computer World 2006 May / PCWMAY06.iso / Software / Freeware / First Page 2006 3.00 / fp2006-final-3.00-setup.exe / {app} / Iscripts / Forms Misc / form-screener.izs < prev    next >
Text File  |  2005-09-28  |  4KB  |  145 lines

  1. <!NOWIZARD>
  2.  
  3. <!TITLE>Form Screener 
  4.  
  5. <!/TITLE>
  6.  
  7. <!DESCRIPTION>Don't want a certain person to fill out a form? Using this script, those people will be rejected after they put their name in. <!/DESCRIPTION> 
  8.  
  9. <!CATEGORY>Forms<!/CATEGORY>
  10.  
  11. <!SCRIPT>
  12. <!-- START OF SCRIPT -->
  13.  
  14. <!-- HOW TO INSTALL FORM SCREENER:
  15.  
  16.   1.  Copy code into the HEAD section of document
  17.   2.  Put last coding into the BODY section of document  -->
  18.  
  19. <!-- STEP ONE: Add code into HEAD section of document  -->
  20.  
  21. <HEAD>
  22.  
  23. <!-- Original:  brainycooldude (brainycooldude2002@yahoo.com) -->
  24. <script language="javascript">
  25. <!--
  26. //These are the names of the people you don't want
  27.  
  28. //To add a person, just put their name in quotation marks
  29. //and add a comma after
  30. Names = new Array(
  31. "test1@email.com",
  32. "test2@email.com",
  33. "test3@email.com",
  34. "test4@email.com",
  35. "test5@email.com")
  36. function Check() {
  37.     //Change FORM and FIELD to the form name and field name throughout this function
  38.     namechk=document.FORM.FIELD.value.toLowerCase()
  39.     awdrgy = 0
  40.     aLeRt = 0
  41.     while (awdrgy<=Names.length-1 && aLeRt!=1) {
  42.         if (namechk==Names[awdrgy]) {
  43.             aLeRt = 1
  44.             alert("You do not have privileges to use this form")
  45.             document.FORM.FIELD.value=""
  46.         }
  47.         awdrgy++
  48.     }
  49. }
  50. -->
  51. </script>
  52.  
  53. </HEAD>
  54.  
  55. <!-- STEP TWO: Add code into BODY section of document  -->
  56.  
  57. <BODY>
  58.  
  59. <!-- Original:  brainycooldude (brainycooldude2002@yahoo.com) -->
  60. <form name="FORM">
  61. <input name="FIELD" onblur="Check();" onblur>
  62. <input type="button" onclick=storytest() value="Submit" class="form">
  63. </form>
  64. The form has been set to reject the following e-mail addresses:
  65. <br>
  66. test1@email.com<br>
  67. test2@email.com<br>
  68. test3@email.com<br>
  69. test4@email.com<br>
  70. test5@email.com<br>
  71. <b>This form is not valid and will not submit. It is just for example purposes.</b>
  72. <br>
  73.  
  74.  
  75. <!-- END OF SCRIPT -->
  76. <!/SCRIPT>
  77.  
  78. <!PREVIEW>
  79. <!-- START OF SCRIPT -->
  80.  
  81. <!-- HOW TO INSTALL FORM SCREENER:
  82.  
  83.   1.  Copy code into the HEAD section of document
  84.   2.  Put last coding into the BODY section of document  -->
  85.  
  86. <!-- STEP ONE: Add code into HEAD section of document  -->
  87.  
  88. <HEAD>
  89.  
  90. <!-- Original:  brainycooldude (brainycooldude2002@yahoo.com) -->
  91. <script language="javascript">
  92. <!--
  93. //These are the names of the people you don't want
  94.  
  95. //To add a person, just put their name in quotation marks
  96. //and add a comma after
  97. Names = new Array(
  98. "test1@email.com",
  99. "test2@email.com",
  100. "test3@email.com",
  101. "test4@email.com",
  102. "test5@email.com")
  103. function Check() {
  104.     //Change FORM and FIELD to the form name and field name throughout this function
  105.     namechk=document.FORM.FIELD.value.toLowerCase()
  106.     awdrgy = 0
  107.     aLeRt = 0
  108.     while (awdrgy<=Names.length-1 && aLeRt!=1) {
  109.         if (namechk==Names[awdrgy]) {
  110.             aLeRt = 1
  111.             alert("You do not have privileges to use this form")
  112.             document.FORM.FIELD.value=""
  113.         }
  114.         awdrgy++
  115.     }
  116. }
  117. -->
  118. </script>
  119.  
  120. </HEAD>
  121.  
  122. <!-- STEP TWO: Add code into BODY section of document  -->
  123.  
  124. <BODY>
  125.  
  126. <!-- Original:  brainycooldude (brainycooldude2002@yahoo.com) -->
  127. <form name="FORM">
  128. <input name="FIELD" onblur="Check();" onblur>
  129. <input type="button" onclick=storytest() value="Submit" class="form">
  130. </form>
  131. The form has been set to reject the following e-mail addresses:
  132. <br>
  133. test1@email.com<br>
  134. test2@email.com<br>
  135. test3@email.com<br>
  136. test4@email.com<br>
  137. test5@email.com<br>
  138. <b>This form is not valid and will not submit. It is just for example purposes.</b>
  139. <br>
  140.  
  141. <!-- END OF SCRIPT -->
  142. <!/PREVIEW>
  143.  
  144. <!RELATED>NONE<!/RELATED>
  145.